<%@page import="com.metagurukul.metagranth.service.QuestionService"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%
	if(request.getParameter("q")!=null){
	String query = request.getParameter("q");
	List<String> questionTitleList = QuestionService.getQuestionTitleList(query);
	Iterator<String> iterator = questionTitleList.iterator();
	while(iterator.hasNext()) {
		String title = (String)iterator.next();
		out.println(title);
	}
	} else {
		response.sendRedirect("home.jsp");
	}
%>